<?php 
session_start();
$_SESSION['dbuser']='softbos';
$_SESSION['dbpwd']='developer';
?>
<html>
	<head>		
		<link href="/css/main.css" rel="stylesheet">	
		<script src="/js/jquery-2.0.3.min.js"></script>	
		<script type='text/javascript'>		
			$(document).ready(function(){ //binding fadeToggle functionality
				$('h3').each(function(){$(this).append('<expander>-</expander>')});
				$('h3').click(function(){
					var expander = $('expander',$(this)).html();
					$(this).next('.section').fadeToggle();
					$('expander',$(this)).html((expander=='+')? '-' : '+');
				});
			});
		</script>
	</head>
	<body>
		<a href="dbcode/UserRead.php">read</a>
		<hr/>
		<h3>dbo.User</h3>
		<div class='section'>
			<form method="POST" action="dbcode/UserWrite.php">
				INSERT INTO User (Id,Nick,Password) VALUES(
				<input placeholder='Id' name="Id0" value="null">,
				<input placeholder='Nick' name="Nick0" value="bohdan">,
				<input placeholder='Password' name="Password0" value="Toronto">);
				<input type="submit" value="insert">
			</form>
			<form method="POST" action="dbcode/UserUpdate.php">
				UPDATE User SET
				<input placeholder='datafield' type='text' name="datafield0" value="Nick"> = 
				<input placeholder='Nick' name="value0" value="bohdan">				
				WHERE <input placeholder='keyfield' type='text' name="keyfield0" value="Id"> 
				<input placeholder='operator' type='text' name="operator0" value="="> 
				<input placeholder='Id' name="key0" value="2">
				<input type="submit" value="update">
			</form>
			<form method="POST" action="dbcode/UserDelete.php">
				DELETE FROM User WHERE
				<input placeholder='keyfield' type='text' name="keyfield0" value="Id">
				<input placeholder='operator' type='text' name="operator0" value="="> 
				<input placeholder='key' name="key0" value="2">								
				<input type="submit" value="delete">
			</form>
		</div>
		<h3>dbo.Customer</h3>
		<div class='section'>
			Fields for customer table*
		</div>		
		<?
		//phpinfo(INFO_MODULES);
		//phpinfo(); 
		?>

		<hr/>
		<?
		echo 'database user: '.$_SESSION['dbuser'].'<br/>';
		echo 'database password: '.$_SESSION['dbpwd'].'<br/>';
		?>
	</body>
</html>
